import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'  // 项目名称 cookie的前缀

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getLocalstorage(itemAbbr) {
	return localStorage.getItem(itemAbbr)
}

export function setLocalstorage(itemAbbr, value) {
	return localStorage.setItem(itemAbbr, value)
}

export function removeLocalstorage(itemAbbr) {
	return localStorage.removeItem(itemAbbr)
}
